home *** CD-ROM | disk | FTP | other *** search
- dlclose(3c) Last changed: 1-8-99
-
-
- NNAAMMEE
- ddllcclloossee - Closes a shared object
-
- SSYYNNOOPPSSIISS
- cccc [_f_l_a_g ......]] _f_i_l_e ...... --llcc[[_l_i_b_r_a_r_y ......]]
-
- ##iinncclluuddee <<ddllffccnn..hh>>
-
- iinntt ddllcclloossee((vvooiidd **_h_a_n_d_l_e));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- ddllcclloossee disassociates from the current process a shared object
- previously opened by the ddllooppeenn, ssggiiddllaadddd, or ssggiiddllooppeenn__vveerrssiioonn
- command. Once an object is closed by ddllcclloossee, its symbols are no
- longer available to ddllssyymm or to the program. All objects loaded
- automatically as a result of invoking ddllooppeenn on the referenced object
- are also closed (however no object still open as a result of any
- ddllooppeenn, ssggiiddllaadddd, or ssggiiddllooppeenn__vveerrssiioonn command is closed until ddllcclloossee
- has closed the last open _h_a_n_d_l_e.
-
- _h_a_n_d_l_e is the value returned by a previous invocation of ddllooppeenn.
-
- RREETTUURRNN VVAALLUUEESS
- If the referenced object was successfully closed, ddllcclloossee returns 0.
- If the object could not be closed, or if _h_a_n_d_l_e does not refer to an
- open object, ddllcclloossee returns a non-0 value. More detailed diagnostic
- information is available through ddlleerrrroorr.
-
- NNOOTTEESS
- A successful invocation of ddllcclloossee does not guarantee that the objects
- associated with _h_a_n_d_l_e are actually removed from the address space of
- the process. Objects loaded by one invocation of ddllooppeenn can also be
- loaded by another invocation of ddllooppeenn. The same object can also be
- opened multiple times. An object is not removed from the address
- space until all references to that object through an explicit ddllooppeenn
- invocation have been closed and all other objects implicitly
- referencing that object have also been closed.
-
- Once an object has been closed by ddllcclloossee, referencing symbols
- contained in that object can cause undefined behavior.
-
- Use of ddllcclloossee on a Dynamic Shared Object (DSO) can cause surprising
- side effects because ddllcclloossee forces many symbol's GOT entries to be
- reset for re-lazy-evaluation. A result of this is that previously-
- saved (by the program or a DSO) function pointers might hold obsolete
- or incorrect values.
-
- Symbol lookups proceed in order on a linear list, and a DSO is not
- opened twice with the same version number (unless different ddllooppeenn
- paths make the DSO name appear different to the _r_l_d program). When
- multiple ssggiiddllaadddd commands are executed and an earlier DSO is closed
- by ddllcclloossee, this can change the symbol to which a call is resolved and
- even result in unintentional calls to different routines (with the
- same name) from a single place in the program at different times. For
- more information, see the NNaammeessppaaccee IIssssuueess section in the ddllooppeenn(3)
- man page.
-
- SSEEEE AALLSSOO
- ddlleerrrroorr((33)),, ddllooppeenn((33)),, ssggiiddllooppeenn__vveerrssiioonn((33)),, ssggiiddllaadddd((33)),, ddllssyymm((33)),,
- ddssoo((55))
-
- This man page is available only online.
-